Formatting for Text Job Format Mode Printing
If the user chooses to print in a direct mode and the driver's preferred mode is gxTextJobFormatMode, you may choose to reformat the document based on the characteristics of the printer. You must query the printer driver to obtain these characteristics by calling theGXJobFormatModeQuery
function, which is described on page 4-83.QuickDraw GX provides an enumerated data type whose values specify the characteristics that you may determine. You use one of these values in the
GXGetJobFormatModeQuery
function to specify the characteristic of interest. Table 4-4 identifies these characteristics. Variables of typegxQueryType
are used to store the kind of request.A query returns a pointer to a data structure that contains the requested information. The kind of data structure depends on the kind of query.
The following structures are used to interpret the source and destination data:
- For the gxGetJobFormatLineConstraintQuery query, the source data is
nil
, and the destination data is returned in a gxPositionConstraintTable structure:
struct gxPositionConstraintTable { gxPoint phase; gxPoint offset; long numSizes; Fixed sizes[1]; };
- For the gxGetJobFormatFontConstraintQuery query, the source data is a
gxFont
reference and the destination data is also returned in a gxPositionConstraintTable structure.
- Note
- A
numSizes
value of gxConstraintRange indicates a range of sizes, in whichsize[0]
specifies the minimum size andsize[1]
specifies the maximum size.![]()
- For the gxGetJobFormatFontCommonStylesQuery query, the source data is a
gxFont
reference, and the destination data is returned in a gxStyleNameTable structure:
struct gxStyleNameTable { long numStyleNames; /* number of style names */ Str255 styleNames[1]; /* any number of style names */ };
- For the gxSetStyleJobFormatCommonStyleQuery query, the source data is a style name from a gxStyleNameTable structure, and the destination data is returned in a
gxStyle
reference.- For the gxGetJobFormatFontsQuery query, the source data is
nil
, and the destination data is returned in a gxFontTable structure:
struct gxFontTable { long numFonts; /* number of font references */ gxFont fonts[1]; /* any number of font references */ };
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help